import { pubRequire } from '@utils/public'
const baseUrl = '/activities/orders'

// 获取发奖管理列表
export function getOrderList(params, callBack, errBack) {
  return pubRequire('get', `${baseUrl}`, params, callBack, errBack)
}

// 批量导入京东卡或实体订单
export function importJDcards(type) {
  return `${baseUrl}/deliver?type=${type}`
}
// 下载导出模板
export function importJDcardsTemplate(type) {
  return `${baseUrl}/export?type=${type}`
}

// 下载失败数据
export function downloadFailData(type) {
  return `${baseUrl}/export/error?type=${type}`
}
// 发货-虚拟 or 实物
export function deliverGood(id, params,type, callBack, errBack) {
  pubRequire('patch', `${baseUrl}/${id}/deliver?type=${type}`, params, callBack, errBack)
}
// 查看详情
export function getDetail(id, callBack, errBack) {
  pubRequire('get', `${baseUrl}/${id}`,'', callBack, errBack)
}
